#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n=0;
  int a=0;//60
  int b=0;//85
  cin>>n;
  vector<int> ret(n);
  for(int i=0;i<n;++i)
  {
    cin>>ret[i];
  }
  for(int i=0;i<n;++i)
  {
    if(ret[i]>=85)
    {
      b=b+1;
    }
    if(ret[i]>=60)
    {
      a=a+1;
    }
  }
  int a1=round(a*100.0/n);
  int b1=round(b*100.0/n);
  cout<<a1<<'%'<<endl;
  cout<<b1<<'%'<<endl;
  return 0;
}
